package com.xinqing.test.modle;

import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

public class SQLParam {
	@NotEmpty
	@NotNull
	private String sql;
	private String eng = "Hive";
	private String apt;
	private String key;
	@Min(0)
	@Max(12 * 30 * 24)
	private Double live = 2 * 1.0;
	private Boolean cache = true;
	private Integer wait = 7;
	private String refresh;
	private double api_ver = 1.0;

	private int size = 50000;
	private String cbUrl;
	private String esQueryType ="http";
	private String logId;
	private String strictDepend; //严格依赖结果，出现问题需要不断重试

	public String getEsQueryType() {
		return esQueryType;
	}

	public void seEstQueryType(String esQueryType) {
		this.esQueryType = esQueryType;
	}

	public double getApi_ver() {
		return api_ver;
	}

	public void setApi_ver(double api_ver) {
		this.api_ver = api_ver;
	}

	public Boolean getCache() {
		return cache;
	}

	public void setCache(Boolean cache) {
		this.cache = cache;
	}

	public Integer getWait() {
		return wait;
	}

	public void setWait(Integer wait) {
		this.wait = wait;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public String getEng() {
		return eng;
	}

	public Double getLive() {
		return live;
	}

	public void setLive(Double live) {
		this.live = live;
	}

	public void setEng(String eng) {
		this.eng = eng;
	}

	public String getApt() {
		return apt;
	}

	public void setApt(String apt) {
		this.apt = apt;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getRefresh() {
		return refresh;
	}

	public void setRefresh(String refresh) {
		this.refresh = refresh;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public String getCbUrl() {
		return cbUrl;
	}

	public void setCbUrl(String cbUrl) {
		this.cbUrl = cbUrl;
	}

	public void setEsQueryType(String esQueryType) {
		this.esQueryType = esQueryType;
	}

	public String getLogId() {
		return logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	public String getStrictDepend() {
		return strictDepend;
	}

	public void setStrictDepend(String strictDepend) {
		this.strictDepend = strictDepend;
	}

	@Override
	public String toString() {
		return "SQLParam{" +
				"sql='" + sql + '\'' +
				", eng='" + eng + '\'' +
				", apt='" + apt + '\'' +
				", key='" + key + '\'' +
				", live=" + live +
				", cache=" + cache +
				", wait=" + wait +
				", refresh='" + refresh + '\'' +
				", api_ver=" + api_ver +
				", size=" + size +
				", cbUrl='" + cbUrl + '\'' +
				", esQueryType='" + esQueryType + '\'' +
				", logId='" + logId + '\'' +
				", strictDepend='" + strictDepend + '\'' +
				'}';
	}

}
